<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateWxusersTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('wxusers', function (Blueprint $table) {
            $table->id();
            $table->string('nickName')->nullable()->comment('昵称');
            $table->string("openid")->unique()->comment('微信openid');
            $table->string('avatarUrl')->nullable()->comment('用户头像URL');
            $table->string('city')->nullable()->comment('城市');
            $table->string('country')->nullable()->comment('国家');
            $table->smallInteger('gender')->nullable()->comment('性别');
            $table->string('language')->nullable()->comment('语言');
            $table->string('province')->nullable()->comment('省份');
            $table->string('name')->nullable()->comment('姓名');
            $table->string('mobile')->nullable()->comment('手机号');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('wxusers');
    }
}
